{% extends "twitter/layout.html" %}
{% block content %}
  <h2>Messages from {{ obj_user.username }}</h2>
  {% if user.is_authenticated %}
    {% if user.username != obj_user.username %}
      {% if is_following %}
        <form action="{% url 'twitter:user_unfollow' username=obj_user.username %}" method="post">
          {% csrf_token %}
          <input type="submit" value="- Un-follow" />
        </form>
      {% else %}
        <form action="{% url 'twitter:user_follow' username=obj_user.username %}" method="post">
          {% csrf_token %}
          <input type="submit" value="+ Follow" />
        </form>
      {% endif %}
    {% endif %}
  {% endif %}

    {% for message in page_obj %}
      {% include "twitter/includes/message.html" %}
    {% endfor %}

  {% include "twitter/includes/pagination.html" %}
{% endblock %}
